package com.ecloud.gardensterminal.controller.dto;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Squbi
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GardensMqttCallback {
    private String uuid;
    private String type;
    private String url;
    private String data;

    public GardensMqttCallback(String json) {
        GardensMqttCallback dto = JSON.parseObject(json, this.getClass());
        this.uuid = dto.uuid;
        this.type = dto.type;
        this.url = dto.url;
        this.data = dto.data;
    }
}
